<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3//EN">
<HTML><HEAD>
		<TITLE>User's Reference - System</TITLE>
		<META HTTP-EQUIV="keywords" CONTENT="GRAPHICS VISUALIZATION VISUAL PROGRAM DATA
MINING">
	<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
</HEAD><BODY BGCOLOR="#FFFFFF" link="#00004b" vlink="#4b004b">
		<TABLE width=510 border=0 cellpadding=0 cellspacing=0>
			<TR>
				<TD><IMG src="../images/spacer.gif" width=80 height=1></TD>
				<TD><IMG src="../images/spacer.gif" width=49 height=1></TD>
				<TD><IMG src="../images/spacer.gif" width=24 height=1></TD>
				<TD><IMG src="../images/spacer.gif" width=100 height=1></TD>
				<TD><IMG src="../images/spacer.gif" width=3 height=1></TD>
				<TD><IMG src="../images/spacer.gif" width=127 height=1></TD>
				<TD><IMG src="../images/spacer.gif" width=6 height=1></TD>
				<TD><IMG src="../images/spacer.gif" width=50 height=1></TD>
				<TD><IMG src="../images/spacer.gif" width=71 height=1></TD>
			</TR>
			<TR>
				<TD colspan=9><IMG src="../images/flcgh_01.gif" width=510 height=24 alt="OpenDX - Documentation"></TD>
			</TR>
			<TR>
				<TD colspan=2><A href="../allguide.htm"><IMG src="../images/flcgh_02.gif" width=129 height=25 border="0" alt="Full Contents"></A></TD>
				<TD colspan=3><A href="../qikguide.htm"><IMG src="../images/flcgh_03.gif" width=127 height=25 border="0" alt="QuickStart Guide"></A></TD>
				<TD><A href="../usrguide.htm"><IMG src="../images/flcgh_04.gif" width=127 height=25 border="0" alt="User's Guide"></A></TD>
				<TD colspan=3><B><A href="../refguide.htm"><IMG src="../images/flcgh_05d.gif" width=127 height=25 border="0" alt="User's Reference"></A></B></TD>
			</TR>
			<TR>
				<TD><A href="refgu154.htm"><IMG src="../images/flcgh_06.gif" width=80 height=17 border="0" alt="Previous Page"></A></TD>
				<TD colspan=2><A href="refgu156.htm"><IMG src="../images/flcgh_07.gif" width=73 height=17 border="0" alt="Next Page"></A></TD>
				<TD><A href="../refguide.htm"><IMG src="../images/flcgh_08.gif" width=100 height=17 border="0" alt="Table of Contents"></A></TD>
				<TD colspan=3><A href="refgu009.htm"><IMG src="../images/flcgh_09.gif" width=136 height=17 border="0" alt="Partial Table of Contents"></A></TD>
				<TD><A href="refgu175.htm"><IMG src="../images/flcgh_10.gif" width=50 height=17 border="0" alt="Index"></A></TD>
				<TD><A href="../srchindx.htm"><IMG src="../images/flcgh_11.gif" width=71 height=17 border="0" alt="Search"></A></TD>
			</TR>
		</TABLE>
		<H3><A name="HDRSYSTEM" ></A>System</H3>
		<A NAME="IDX737"></A>
		<P><STRONG>Category</STRONG>
<P>
<A HREF="refgu008.htm#HDRCATDBG">Debugging</A>
<P><STRONG>Function</STRONG>
<P>
Executes a system function.
<P><STRONG>Syntax</STRONG>
<PRE>
System(<STRONG>string</STRONG>);
</PRE>
<P><STRONG>Inputs</STRONG>
<BR>
<TABLE BORDER>
<TR>
<TH ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">Name
</TH><TH ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">Type
</TH><TH ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">Default
</TH><TH ALIGN="LEFT" VALIGN="TOP" WIDTH="40%">Description
</TH></TR><TR>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%"><TT><STRONG>string</STRONG></TT>
</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">string
</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">none
</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="40%">shell command to be executed
</TD></TR></TABLE>
<P><STRONG>Functional Details</STRONG>
<P>
The System module uses the C library <TT><STRONG>system()</STRONG></TT>
function to execute operating system commands.

		<P>If the characters %, \, or &quot; occur in the command string, they must be escaped: the percent sign must be preceded by another percent sign; backslashes and double quotes must be preceded by a backslash.
		<H4>Special note about running Microsoft Window's executables and pathnames. </H4>
		<P>Because a space can be part of an application's path, it may be required that you quote the path string. Following the convention in the previous paragraph, quotes must be inserted with \&quot; and backslashes will need to use the escaped \ (i.e. \\). There is one exception to this--if the pathname does not contain a space and it starts a full path to the application (<I>letter followed by colon</I>), then non-escaped backslashes may be used. For example acceptable and unacceptable strings, refer to the following:</P>
		<H5>Acceptable:</H5>
		<P><CODE>&quot;C:\Progra~1\MyApp\RunData.exe datafile.dat&quot;<BR>
			</CODE><CODE>&quot;\&quot;C:\\Program Files\\MyApp\\RunData.exe\\&quot; datafile.dat&quot;<BR>
				&quot;\&quot;C:/Program Files/MyApp/RunData.exe\&quot; datafile.dat&quot;</CODE></P>
		<H5>Unacceptable</H5>
		<P><CODE>&quot;C:\Program Files\MyApp\RunData.exe datafile.dat&quot;<BR>
				(previous needs shortpath used--no spaces)<BR>
				&quot;\&quot;C:\Program Files\MyApp\RunData.exe\&quot; datafile.net&quot;<BR>
				(previous needs backslashes escaped)</CODE></P>
		<P>
		<P><STRONG>Script Language Example</STRONG></P>
		<P>
This example creates a sequence of captioned images using different
isosurface values.
The Format module creates a different image file name for
each image.
The System module executes the compress function to minimize the amount
of disk space used.
<PRE>
electrondensity = Import("/usr/local/dx/samples/data/watermolecule");
electrondensity = Partition(electrondensity);
camera = AutoCamera(electrondensity,resolution=300,aspect=1,width=2.5);
macro makeiso(isoval)
&#123;
    isosurface = Isosurface(electrondensity, isoval);
    caption = Format("isoval = %g", isoval);
    caption = Caption(caption);
    imagename = Format("iso%4.2f.rgb", isoval);
    collected = Collect(caption, isosurface);
    image = Render(collected, camera);
    Display(image);
    WriteImage(image, imagename);
    command = Format("compress %s", imagename);
    System(command);
&#125;
makeiso(0.1);
makeiso(0.2);
makeiso(0.3);
makeiso(0.33);
makeiso(0.36);
makeiso(0.39);
</PRE>
		<P>
		<HR>
		<DIV align="center">
			<P><A href="../allguide.htm"><IMG src="../images/foot-fc.gif" width="94" height="18" border="0" alt="Full Contents"></A> <A href="../qikguide.htm"><IMG src="../images/foot-qs.gif" width="94" height="18" border="0" alt="QuickStart Guide"></A> <A href="../usrguide.htm"><IMG src="../images/foot-ug.gif" width="94" height="18" border="0" alt="User's Guide"></A> <A href="../refguide.htm"><IMG src="../images/foot-ur.gif" width="94" height="18" border="0" alt="User's Reference"></A></P>
		</DIV>
		<DIV align="center">
			<P><FONT size="-1">[ <A href="http://www.research.ibm.com/dx">OpenDX Home at IBM</A>&nbsp;|&nbsp;<A href="http://www.opendx.org/">OpenDX.org</A>&nbsp;] </FONT></P>
			<P></P>
		</DIV>
		<P></P>
	</BODY></HTML>
